package com.example.threaddemo.error;

import java.util.Random;

public class HeapSpaceDemo {
    public static void main(String[] args) {

        String str = "dota";

        while (true){
            str += str + new Random().nextInt(999999999) + new Random().nextInt(888888888);
            str.intern();
        }

    }
}
